Integrand size = 23, antiderivative size = 159 \[ \int \tan ^3(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {\sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {\sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}-\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d} \]
[Out]
Time = 0.40 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {3647, 3711, 12, 3609, 3620, 3618, 65, 214} \[ \int \tan ^3(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {\sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {\sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}-\frac {2 \sqrt {a+b \tan (c+d x)}}{d} \]
[In]
[Out]
Rule 12
Rule 65
Rule 214
Rule 3609
Rule 3618
Rule 3620
Rule 3647
Rule 3711
Rubi steps \begin{align*} \text {integral}& = \frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}+\frac {2 \int \sqrt {a+b \tan (c+d x)} \left (-a-\frac {5}{2} b \tan (c+d x)-a \tan ^2(c+d x)\right ) \, dx}{5 b} \\ & = -\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}+\frac {2 \int -\frac {5}{2} b \tan (c+d x) \sqrt {a+b \tan (c+d x)} \, dx}{5 b} \\ & = -\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}-\int \tan (c+d x) \sqrt {a+b \tan (c+d x)} \, dx \\ & = -\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}-\int \frac {-b+a \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx \\ & = -\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}-\frac {1}{2} (-i a-b) \int \frac {1+i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx-\frac {1}{2} (i a-b) \int \frac {1-i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx \\ & = -\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}-\frac {(a-i b) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 d}-\frac {(a+i b) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 d} \\ & = -\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}+\frac {(i a-b) \text {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}-\frac {(i a+b) \text {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d} \\ & = \frac {\sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {\sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}-\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d} \\ \end{align*}
Time = 1.00 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.88 \[ \int \tan ^3(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {15 \sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )+15 \sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )+\frac {2 \sqrt {a+b \tan (c+d x)} \left (-2 a^2-15 b^2+a b \tan (c+d x)+3 b^2 \tan ^2(c+d x)\right )}{b^2}}{15 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(369\) vs. \(2(133)=266\).
Time = 0.98 (sec) , antiderivative size = 370, normalized size of antiderivative = 2.33
method | result | size |
derivativedivides | \(\frac {\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5}-\frac {2 a \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3}-2 b^{2} \sqrt {a +b \tan \left (d x +c \right )}+2 b^{2} \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{8}+\frac {\left (\sqrt {a^{2}+b^{2}}-a \right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{2 \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right )}{8}+\frac {\left (a -\sqrt {a^{2}+b^{2}}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{2 \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{b^{2} d}\) | \(370\) |
default | \(\frac {\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5}-\frac {2 a \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3}-2 b^{2} \sqrt {a +b \tan \left (d x +c \right )}+2 b^{2} \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{8}+\frac {\left (\sqrt {a^{2}+b^{2}}-a \right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{2 \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right )}{8}+\frac {\left (a -\sqrt {a^{2}+b^{2}}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{2 \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{b^{2} d}\) | \(370\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 334 vs. \(2 (129) = 258\).
Time = 0.26 (sec) , antiderivative size = 334, normalized size of antiderivative = 2.10 \[ \int \tan ^3(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {15 \, b^{2} d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) - 15 \, b^{2} d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (-d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) + 15 \, b^{2} d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) - 15 \, b^{2} d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (-d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) + 4 \, {\left (3 \, b^{2} \tan \left (d x + c\right )^{2} + a b \tan \left (d x + c\right ) - 2 \, a^{2} - 15 \, b^{2}\right )} \sqrt {b \tan \left (d x + c\right ) + a}}{30 \, b^{2} d} \]
[In]
[Out]
\[ \int \tan ^3(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\int \sqrt {a + b \tan {\left (c + d x \right )}} \tan ^{3}{\left (c + d x \right )}\, dx \]
[In]
[Out]
\[ \int \tan ^3(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\int { \sqrt {b \tan \left (d x + c\right ) + a} \tan \left (d x + c\right )^{3} \,d x } \]
[In]
[Out]
Timed out. \[ \int \tan ^3(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\text {Timed out} \]
[In]
[Out]
Time = 9.74 (sec) , antiderivative size = 354, normalized size of antiderivative = 2.23 \[ \int \tan ^3(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\left (\frac {2\,a^2}{b^2\,d}-\frac {2\,\left (a^2+b^2\right )}{b^2\,d}\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}+\frac {2\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{5/2}}{5\,b^2\,d}-\frac {2\,a\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{3/2}}{3\,b^2\,d}+\mathrm {atan}\left (\frac {b^4\,\sqrt {\frac {a}{4\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,32{}\mathrm {i}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}+\frac {32\,a\,b^3\,\sqrt {\frac {a}{4\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}\right )\,\sqrt {\frac {a-b\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i}-\mathrm {atan}\left (\frac {b^4\,\sqrt {\frac {a}{4\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,32{}\mathrm {i}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}-\frac {32\,a\,b^3\,\sqrt {\frac {a}{4\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}\right )\,\sqrt {\frac {a+b\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i} \]
[In]
[Out]